<?php
/*
Author        : Duykham
Last modified : 20061026
TODO          : doc danh sach cac file trong mot thu muc
*/
//Nhan gia tri value tu cau truy van gan cho bien $folder1
$folder1= $_GET['value'];
$dir0 = $_GET['dir'];
//$dir0 = "C:\Program Files\Macromedia\Flash Media Server 2\applications\ProconDemoApp\\";
//khai bao bien $dir1 co gia tri la duong dan den thu muc can xu ly
$dir1 = $dir0.$folder1;
// Open a known directory, and proceed to read its contents
//Mo thu muc $dir1 va doc noi dung trong thu muc do
if (is_dir($dir1)) {
   if ($dh = opendir($dir1)) {
       $i = 0;
       while (($file = readdir($dh)) !== false) {
       if ($file !== "." && $file !== ".."){
           echo "item".$i."=".$file."&" ;
                   echo "<br>";
           $i++;
           }
       }
       closedir($dh);
   }
}
?>
